﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using W.Purchase.Domain;
using W.Purchase.Repository.Interface;

namespace W.Purchase.Repository.Impl
{
    public class PayableRepository : BaseRepository<Payable>, IPayableRepository
    {
        public PayableRepository(EFCoreDbContext db) : base(db)
        {
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> AddAsync(Payable entity)
        {
           return await base.AddAsync(entity);
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public async Task<List<Payable>> GetAllAsaync()
        {
            return await base.GetAllAsaync();
        }
        
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<Payable> GetModelAsync(int id)
        {
            return await base.GetModelAsync(id);
        }
        /// <summary>
        /// 带条件
        /// </summary>
        /// <param name="expre"></param>
        /// <returns></returns>
        public async Task<List<Payable>> GetAsync(Expression<Func<Payable, bool>> expre)
        {
            return await base.GetAsync(expre);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> Update(Payable entity)
        {
            return await base.Update(entity);
        }

        public async Task<int> UpdateRangeAsync(List<Payable> t)
        {
           return await base.UpdateRangeAsync(t);
        }
    }
}
